import request from '@/utils/request'

//查询配送员列表
export function staffList(params) {
  return request({
    url:'/api/staff/list',
    method:'get',
    params:params
  })
}

//查询配送员信息
export function getStaff(staffId) {
  return request({
    url:'/api/staff/queryStaff/'+staffId,
    method:'get'
  })
}

//配送员信息修改
export function updateStaff(data) {
  return request({
    url:'/api/staff/updateStaff',
    method:'post',
    data:data
  })
}
//查询配送员详细信息
export function staffInfoById(staffId) {
  return request({
    url:'/api/staff/staffInfo/'+staffId,
    method:'get',
  })
}
//重置密码
export function resetStaffPwd(staffId, password) {
  const data = {
    staffId,
    password
  }
  return request({
    url: '/api/staff/updateStaff',
    method: 'post',
    data: data
  })
}

//删除配送员
export function delStaff(staffId) {
  return request({
    url: '/api/staff/'+staffId,
    method: 'delete'
  })
}

//批量删除
export function delStaffS(staffIds) {
  return request({
    url:'/api/staff/deleteStaffBatch/'+staffIds,
    method:'delete',
  })
}
